home *** CD-ROM | disk | FTP | other *** search
Makefile | 1995-05-16 | 2.7 KB | 108 lines |
- # Copyright (c) 1994 Sun Wu, Udi Manber, Burra Gopal. All Rights Reserved.
-
- # You might have to change these depending on your machine configuration.
- # AR and RABLIB are the library-archive programs. On Solaris, RANLIB is not
- # required (define it to true) and AR is in /usr/ccs/bin/ar (on our machine!).
- AR = /usr/ccs/bin/ar #for Solaris
- RANLIB = true #for Solaris
-
- # Define DIRENT to be 1 when you don't have <sys/dir.h> else define it to be 0.
- DIRENT = 1
-
- # You might have to change this depending on your machine configuration.
- CC = gcc -traditional #cc
-
- SHELL = /bin/sh
-
- # YOU DON'T HAVE TO CHANGE ANYTHING BELOW THIS LINE
-
- # The binaries will be made in ../bin/. and the agrep library in ../lib
- # You normally don't have to change them.
- BINDIR = ../bin
- LIBDIR = ../lib
- TCOMP = cast
- TCOMPDIR = ../compress
- AGREPDIR = ../agrep
-
- CFLAGS = -DDIRENT=$(DIRENT) -DMEASURE_TIMES=0 -DAGREP_POINTER=1 -O
-
- PROG = agrep
- NOTCPROG = notc$(PROG)
-
- # You can change the target to use the "dummyfilter" so that agrep does not
- # use the cast library by changing:
- # all: $(PROG)
- # to:
- # all: $(NOTCPROG)
- # Both create libagrep.a which can be linked with user a program.
-
- all: $(PROG)
- cp $(PROG) $(BINDIR)/.
-
- LIB = $(LIBDIR)/lib$(PROG).a
- HDRS = agrep.h checkfile.h re.h defs.h
- TCOMPLIBOBJ = \
- $(TCOMPDIR)/hash.o \
- $(TCOMPDIR)/string.o \
- $(TCOMPDIR)/misc.o \
- $(TCOMPDIR)/quick.o \
- $(TCOMPDIR)/cast.o \
- $(TCOMPDIR)/uncast.o \
- $(TCOMPDIR)/tsimpletest.o \
- $(TCOMPDIR)/tbuild.o\
- $(TCOMPDIR)/tmemlook.o
- OBJS = \
- follow.o \
- asearch.o \
- asearch1.o \
- agrep.o \
- bitap.o \
- checkfile.o \
- compat.o \
- maskgen.o \
- parse.o \
- checksg.o \
- preprocess.o \
- delim.o \
- asplit.o \
- recursive.o \
- sgrep.o \
- newmgrep.o \
- utilities.o
-
- $(PROG): $(OBJS) main.o $(LIBDIR)/lib$(TCOMP).a
- $(CC) -L$(LIBDIR) $(CFLAGS) -o $@ $(OBJS) main.o -l$(TCOMP)
- $(AR) rcv $(LIB) $(OBJS) $(TCOMPLIBOBJ)
- $(RANLIB) $(LIB)
-
- $(LIBDIR)/lib$(TCOMP).a:
- cd $(TCOMPDIR) ; $(MAKE) -f Makefile.solaris
-
- $(NOTCPROG): $(OBJS) dummyfilters.o main.o
- $(CC) $(CFLAGS) -o $(PROG) $(OBJS) dummyfilters.o main.o
- $(AR) rcv $(LIB) $(OBJS) dummyfilters.o
- $(RANLIB) $(LIB)
-
- clean:
- -rm -f $(LIB) $(OBJS) dummyfilters.o main.o core a.out $(PROG)
-
- asearch.o: agrep.h defs.h
- asearch1.o: agrep.h defs.h
- bitap.o: agrep.h defs.h
- checkfile.o: checkfile.h
- follow.o: re.h
- main.o: agrep.h checkfile.h defs.h
- agrep.o: agrep.h checkfile.h defs.h
- newmgrep.o: agrep.h defs.h
- maskgen.o: agrep.h defs.h
- next.o: agrep.h defs.h
- parse.o: re.h
- preprocess.o: agrep.h defs.h
- checksg.o: agrep.h checkfile.h defs.h
- delim.o: agrep.h defs.h
- asplit.o: agrep.h defs.h
- sgrep.o: agrep.h defs.h
- abm.o: agrep.h defs.h
- utilities.o: re.h
- dummyfilters.o: dummyfilters.c
-